(function(){"use strict";BX.namespace("BX.Landing.History.Action");var e=BX.Landing.Utils.scrollTo;var t=BX.Landing.Utils.slice;BX.Landing.History.Action.editStyle=function(n,o){return BX.Landing.PageObject.getInstance().blocks().then(function(e){var t=e.get(o.block);if(!t){return Promise.reject()}t.forceInit();t.initStyles();return t}).then(function(t){return e(t.node).then(function(){return t})}).then(function(e){var r=t(e.node.querySelectorAll(o.selector));if(e.selector===o.selector){r=[e.content]}r.forEach(function(e){e.className=o[n].className;e.style=o[n].style});return e}).then(function(e){var t=e.forms.get(o.selector);if(t){t.fields.forEach(function(e){e.reset();e.onFrameLoad()})}var n=e.styles.get(o.selector);if(n){e.onStyleInputWithDebounce({node:n.node,data:n.getValue()})}})}})();